package com.runtime.controller;

import com.runtime.bean.Tblestate;
import com.runtime.service.EstateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("estate")
public class EstateController {

    @Autowired
    private EstateService estateService;

    @GetMapping("findById/{estateId}")
    public Tblestate findById(@PathVariable("estateId") long estateId){
        Tblestate tblestate = estateService.findById(estateId);
        return tblestate;
    }
}
